package com.isoft.data.dao;

import com.isoft.data.xml.Onre;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface OnreDao {
    @Insert("insert into META(SNDR,RCVR,SEQN,DDTM,TYPE,STYP)" +
            "values(#{onre.meta.sndr},#{onre.meta.rcvr},"+
            "#{onre.meta.seqn},#{onre.meta.ddtm},"+
            "#{onre.meta.type},#{onre.meta.styp})")
    public int addMETA(@Param("onre") Onre onre);
    
    @Insert("insert into ONRE(SEQN,DDTM,FLID,FFID,FIDE,FATT,STAT,ISTA,PAST,ELDT,MSTA,MIST) " +
            "values(#{onre.meta.seqn},#{onre.meta.ddtm},#{onre.dflt.flid},#{onre.dflt.ffid},#{onre.dflt.fide}," +
            "#{onre.dflt.fatt},#{onre.dflt.stat},#{onre.dflt.ista},#{onre.dflt.past},#{onre.dflt.eldt}" +
            ",#{onre.dflt.msta},#{onre.dflt.mist})")
    public int addOnre(@Param("onre") Onre onre);
}
